package com.chinaunicom.create.factory.factorymethod;

import com.chinaunicom.create.factory.Pizza;

import java.util.Arrays;
import java.util.List;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/7/15 15:16
 * Description:
 */
public class Client {
    public static void main(String[] args) {

        List<String> data = Arrays.asList("A", "B", "C");
        String type = data.get((int) (System.nanoTime() % data.size()));

        AbstarctMethod order = new BJFactory();
        Pizza pizza = order.createPizza(type);
        
        pizza.prepare();
        pizza.make();
        pizza.finish();
    }
}
